Notes for pipelines of transformations for MLF
نویسنده
چکیده
These notes attempt to survey basic manipulations that can be done to a ML functional program prior to compilation. The paper does not consider transformations for improvement of the code but it only considers manipulations of the source text which can allow the compiler to do a better job. Which manipulationto choose depends on the target language. The survey can be useful for answering the above question and hence for choosing a convenient pipeline of transformations to prepare translation towards a given target language. Functional program transformation modiies the whole structure of a functional program in order to facilitate the production of a better code. It can also make the program use less memory. Functional programs have a precise mathematical semantic which allows to use source to source transformation techniques in order to provide any semantically correct desired form of program. In this paper, we address a catalog of eager semantic transformations on a functional language like ML. We consider only here fully automatic program transformation. Most of these transformations are usually well known though it can happen that the paper makes some contribution in some of the transformations that are described. The goal of the paper consists mostly in classifying basic transformations and in seeing how they can be combined into diverses transformation strategies. It might happen that the transformation strategy we describe as a composition of basic transformations could be expressed directly in a more speciic and eecient algorithm. However the division into basic parts makes the transformation toolkit which is proposed in the paper very exible and reusable. 1 A transformation strategy serves a certain purpose. The concern can be the target language of the translation. For example, monomorphization is a useful transformation if the target language is a nonpolymorphic language, and defunctionalization is useful if the target language is rst order, and lambda-lifting is useful if the target language is a term rewriting system. The sole concern can be optimization. In this case, transformation strategies such as deforestation or tuppling are useful. Another concern can be the model of the implementation sequential or parallel or distributed. In this paper, we limit ourselves to some transformation strategies of the rst category. Some basic transformations are easily recognized as belonging in a spe-ciic strategy but they can also be used as steps in other strategies. For example a type enumeration can be a step for a monomorphization but …
منابع مشابه
Graphic Type Constraints and Efficient Type Inference : from ML to MLF Draft Long Version
MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, originally introduced to represent MLF types. We give a few semantic preserving transformations o...
متن کاملGraphic Type Constraints and Efficient Type Inference : from ML to MLF
MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, originally introduced to represent MLF types. We give a few semantic preserving transformations o...
متن کاملPipelines, Templates and Transformations: XML for Natural Language Generation
The paper discusses a number of ways in which XML can be used in natural language generation, including XML-based pipeline architectures, template-based generation with XSL templates, and tree-totree transformations. The ideas are based on practical experience in building an experimental XMLbased generation component for a spoken dialogue system. Prototype implementations using DOM, XSL and Tra...
متن کاملRecasting MLF
The language MLF has been proposed as an alternative to System F that permits partial type inference a la ML. It differs from System F by its types and type-instance relation. Unfortunately, the definition of type instance is only syntactic, and not underpinned by some underlying semantics. It has so far only been justified a posteriori by the type soundness result. In this work, we revisit MLF...
متن کاملThe Impact of Three Feedback Types on Postgraduate TEFL Student Teachers’ Writing Accuracy and Organization
One skill that student teachers need to develop during their academic studies is the capacity to produce accurate and well-organized texts. This study reports on the comparative impact of metalinguistic feedback (MLF), teacher interactive feedback (TIF(, and the peer-feedback (PF) on the accuracy and organization of postgraduate ELT student teachers’ writing. The participants were 57 postgradua...
متن کامل